<template>
	<view class="content">
		<uv-cell-group>
			<uv-cell title="答卷" :isLink="true" @click="ssssss" arrow-direction="right"></uv-cell>
			<uv-cell title="个人信息" :isLink="true" url="/pages/my/userinfo" arrow-direction="right"></uv-cell>
			<uv-cell title="注册下级" :isLink="true" url="/pages/my/RegisterSubordinate" arrow-direction="right"></uv-cell>
			<uv-cell title="实名认证" :isLink="true" @click="bbbbb" arrow-direction="right"></uv-cell>
			<uv-cell title="修改密码" :isLink="true" url="/pages/my/ChangePassword/ChangePassword" arrow-direction="right"></uv-cell>
			<uv-cell title="关于我们" :isLink="true" :url="'/pages/web/web?src=' +config.serveURL + 'index/index/about_us'  + '&title=关于我们'"  arrow-direction="right"></uv-cell>
			<!-- <uv-cell title="用户协议 " :isLink="true" :url="'/pages/web/web?src=' +config.serveURL + 'index/index/user_text'  + '&title=用户协议'"  arrow-direction="right"></uv-cell>
			<uv-cell title="注册协议 " :isLink="true" :url="'/pages/web/web?src=' +config.serveURL + 'index/index/register_text'  + '&title=注册协议'"  arrow-direction="right"></uv-cell> -->
		</uv-cell-group>
		<view @click="logut()" class="position-absolute transform-translate-center button text-center color-FFF font-size-26"
			style="padding: 25rpx 266rpx;width: 150rpx; left: 50%;bottom: 5%;">
			退出登录
		</view>
	</view>
</template>

<script setup>
	import config from '../../request/config';
	import {
		ref,
		reactive
	} from 'vue';
	import {
		onLoad,
		onShow,
		onReady,
		onReachBottom
	} from '@dcloudio/uni-app';
	import {
		nativeUI,
		navigateTo,
		navigateBack
	} from '@/utils/index.js';
	import * as api from '@/request/app.js'; // 引入api 方法
	import local from '@/utils/localStorage.js'; //引入本地存储方法
	onLoad(function(option) {});
	onShow(function() {});
	function ssssss(){
		console.log(1);
		if(local.get('userinfo').answer_score_status == 1){
			nativeUI('您已提交问答！')
		}else{
			navigateTo('/pages/my/testpaper')
		}
	}
	function bbbbb(){
		if(local.get('userinfo').relay_status == 1){
			nativeUI('您已实名！')
		}else{
			navigateTo('/pages/my/authentication/authentication')
		}
	}
	async function logut(){
		uni.showModal({
			title: '提示',
			content: '您确定要退出登录吗?',
			success: function (res) {
				if (res.confirm) {
					uni.reLaunch({
						url:'/pages/Login/login/login'
					})
					uni.clearStorage();
				} else if (res.cancel) {
					console.log('用户点击取消');
				}
			}
		});
	}
	onReady(function() {});
	onReachBottom(function() {});
</script>

<style scoped lang="scss"></style>